#include <stdio.h>
#include <winsock2.h>
#pragma comment(lib,"ws2_32.lib")
void main(){
    unsigned char checksum=0,msg[]="BDTXR,1,0205180,2,,A402FF484541442D00F10103A6E2484541444100F10102A602484541442D00F10103A6E2484541444100F10102A682484541442D00F10103A602FDEE4845";
    unsigned int i,size;
    size=sizeof msg;
    for(i=0;i<size;i++){
        checksum= checksum^msg[i];
    }
    printf("checksum=%hX",checksum);
}